Skip to content

Fix race conditions in test ConsoleLineTracker#2739

Merged
trancexpress merged 1 commit into
eclipse-platform:masterfrom
trancexpress:gh2621
Jun 7, 2026
Merged

Fix race conditions in test ConsoleLineTracker#2739
trancexpress merged 1 commit into
eclipse-platform:masterfrom
trancexpress:gh2621

Conversation

@trancexpress
Copy link
Copy Markdown
Contributor

Tests in org.eclipse.ant.tests.ui which rely on ConsoleLineTracker fail infrequently in I-builds. This is due to:

  1. Relying on a boolean flag for more than two states.

The flag indicates whether the last console is closed or not. An initialized console is marked as closed, which can confuse tests waiting on the closed console state.

  1. Synchronizing on a transient object.

When a console is initialized, the object used for synchronization is replaced. Tests may wait until timeout, due to notifyAll() calls on a different object.

This change introduces a state enum and a single lock object, to avoid the race conditions.

See: #2621

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 6, 2026

Test Results

    54 files  ±0      54 suites  ±0   54m 11s ⏱️ + 19m 57s
 4 671 tests ±0   4 649 ✅ +1   22 💤 ±0  0 ❌  - 1 
11 907 runs  ±0  11 754 ✅ +3  153 💤 ±0  0 ❌  - 3 

Results for commit ae12335. ± Comparison against base commit 4b2964a.

♻️ This comment has been updated with latest results.

Tests in org.eclipse.ant.tests.ui which rely on ConsoleLineTracker
fail infrequently in I-builds. This is due to:

1. Relying on a boolean flag for more than two states.

The flag indicates whether the last console is closed or not.
An initialized console is marked as closed, which can confuse
tests waiting on the closed console state.

2. Synchronizing on a transient object.

When a console is initialized, the object used for synchronization
is replaced. Tests may wait until timeout, due to notifyAll()
calls on a different object.

This change introduces a state enum and a single lock object,
to avoid the race conditions.

See: eclipse-platform#2621
@trancexpress trancexpress merged commit 057056d into eclipse-platform:master Jun 7, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant